package com.yanqu.road.server.cmd.beauty;

import com.yanqu.road.pb.beauty.BeautyProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.player.BeautyModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_BEAUTY_CLEAR_VOICE_RED_DOT,desc = "美女清除选择语音红点")
public class BeautyClearVoiceRedDotCmd extends AbstractCommand {

    private int beautyId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        BeautyProto.beautyVoiceRedDotClearReqMsg req = BeautyProto.beautyVoiceRedDotClearReqMsg.parseFrom(packet.getBytes());
        beautyId = req.getBeautyId();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(BeautyModule.class).clearVoiceRedDot(beautyId);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
